Traditionally, in a Layer 2 (L2) network, a switch (hereinafter referred to as “L2 switch”) that is connected to a Layer 3 (L3) network through a gateway (GW) may be installed. A plurality of terminals under control of the L2 switch form a plurality of different terminal groups. A terminal group is called a segment or a virtual local area (VLAN) network. A network address that is a group identifier identifying a terminal group is assigned to each of the terminal groups. Internet Protocol (IP) addresses that are terminal identifiers each identifying a terminal belonging to the different terminal group do not match, since the network addresses that correspond to first halves of the IP addresses are different. Thus, when terminals that are among the terminals under control of the L2 switch and each belong to the different terminal group communicate with each other, a frame is transmitted and received between the terminals through the GW that is included in the L3 network and configured to execute routing using IP addresses.
However, while the amount of traffic in the L3 network has increased in recent years, a study has been carried out to reduce a processing load to be imposed on the GW of the L3 network. In order to reduce the processing load to be imposed on the GW of the L3 network, in a case where terminals under the L2 switch communicate with each other, it is preferable that frames are transferred without passing through the GW of the L3 network even if the terminals under the L2 switch each belong to the different terminal group.
As a technique for transferring a frame without passing through the GW of the L3 network, a technique using a flow table is known. In this technique, the L2 switch holds the flow table in which ports connected to terminals under the L2 switch, IP addresses of the terminals, and media access control (MAC) addresses of the terminals are associated with each other. When a frame that includes an MAC address of the GW of the L3 network in destination information is received by the L2 switch, the L2 switch identifies a terminal's MAC address that is stored in the flow table in association with a destination IP address identifying a terminal that is a destination of an IP packet within the frame. Then, the L2 switch uses the identified terminal's MAC address to update the MAC address of the GW of the L3 network which is the destination information of the received frame. Then, the L2 switch transfers the received frame having the updated destination information to the terminal under the L2 switch through a port whose information is stored in the flow table in association with the destination IP address. Thus, in a case where terminals under the L2 switch communicate with each other, frames are transferred without passing through the GW of the L3 network even if the terminals under the L2 switch belong to different terminal groups.
Japanese Laid-open Patent Publication No. 2004-304371 is an example of related art.